Skip to content

Conversation

@andrestejerina97
Copy link
Contributor

@andrestejerina97 andrestejerina97 commented Jan 8, 2026

@andrestejerina97 andrestejerina97 marked this pull request as ready for review January 8, 2026 18:54
@matiasperrone-exo matiasperrone-exo force-pushed the feature/add-attendee-formatters branch from d70b11e to 2e6a6c5 Compare January 12, 2026 21:54
@matiasperrone-exo
Copy link
Contributor

The branch was rebased and now it is ready for review.

@dariobressanExo
Copy link

@smarcet this will bet Unit Tested with the change introduced with PR 479. Please can you review this PR.

@romanetar romanetar self-requested a review January 28, 2026 11:07
@caseylocker caseylocker self-requested a review January 28, 2026 15:08
Copy link

@caseylocker caseylocker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical Issues (P1)

These issues will throw PHP Error (not Exception) at runtime, which is not caught by the existing catch (\Exception $ex) blocks. This will abort transactions and cause data loss.


  1. SummitAttendeeAuditLogFormatter.php:20

Problem: SummitAttendee has getSurname(), not getLastName()

// Current (broken):
$name = trim(($subject->getFirstName() ?? '') . ' ' . ($subject->getLastName() ?? '')) ?: 'Unknown Attendee';

// Fix:
$name = trim(($subject->getFirstName() ?? '') . ' ' . ($subject->getSurname() ?? '')) ?: 'Unknown Attendee';


  1. SummitAttendeeBadgeAuditLogFormatter.php:19-21

Problem: Two issues:

  • SummitAttendeeBadge doesn't have getOwner() — must go through getTicket()
  • Owner is SummitAttendee which has getSurname(), not getLastName()

// Current (broken):
$id = $subject->getId() ?? 'unknown';
$owner = $subject->getOwner();
$owner_name = $owner ? trim(($owner->getFirstName() ?? '') . ' ' . ($owner->getLastName() ?? '')) : 'Unknown Owner';

// Fix:
$id = $subject->getId() ?? 'unknown';
$ticket = $subject->getTicket();
$owner = $ticket?->getOwner();
$owner_name = $owner ? trim(($owner->getFirstName() ?? '') . ' ' . ($owner->getSurname() ?? '')) : 'Unknown Owner';


  1. SummitAttendeeTicketAuditLogFormatter.php:21

Problem: getOwner() returns SummitAttendee which has getSurname(), not getLastName()

// Current (broken):
$owner_name = $owner ? trim(($owner->getFirstName() ?? '') . ' ' . ($owner->getLastName() ?? '')) : 'Unknown Owner';

// Fix:
$owner_name = $owner ? trim(($owner->getFirstName() ?? '') . ' ' . ($owner->getSurname() ?? '')) : 'Unknown Owner';


  1. SummitAttendeeNoteAuditLogFormatter.php:21

Problem: getOwner() returns SummitAttendee which has getSurname(), not getLastName()

// Current (broken):
$owner_name = $owner ? trim(($owner->getFirstName() ?? '') . ' ' . ($owner->getLastName() ?? '')) : 'Unknown Owner';

// Fix:
$owner_name = $owner ? trim(($owner->getFirstName() ?? '') . ' ' . ($owner->getSurname() ?? '')) : 'Unknown Owner';

Minor Housekeeping:
You're also missing Copyright headers on the new files. Check the existing formatters for examples:
/**

  • Copyright 2025 OpenStack Foundation
  • Licensed under the Apache License, Version 2.0 (the "License");
  • you may not use this file except in compliance with the License.
  • You may obtain a copy of the License at
  • http://www.apache.org/licenses/LICENSE-2.0
  • Unless required by applicable law or agreed to in writing, software
  • distributed under the License is distributed on an "AS IS" BASIS,
  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • See the License for the specific language governing permissions and
  • limitations under the License.
    **/

@andrestejerina97 andrestejerina97 force-pushed the feature/add-attendee-formatters branch from 7c660e5 to 5fed732 Compare January 28, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants